package com.example.zluserservice.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;

/**
 * @Author zhenliu（孙凌岳）
 * @Description AI生成 - 用户响应DTO
 * @Date 2025/6/15 14:40
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@ApiModel(description = "用户响应DTO")
public class UserResDTO implements Serializable {
    @ApiModelProperty(value = "用户账号")
    private String username;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "用户昵称")
    private String nickName;

    @ApiModelProperty(value = "用户邮箱")
    private String email;

    @ApiModelProperty(value = "手机号码")
    private String mobile;

    @ApiModelProperty(value = "用户性别（0男 1女 2未知）")
    private String sex;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "选中节点")
    private String[] checkedIds;

    @ApiModelProperty(value = "查询用户：用户角色Ids")
    private Set<String> roleVoIds;

    @ApiModelProperty(value = "构建令牌：用户角色标识")
    private Set<String> roleLabels;

    @ApiModelProperty(value = "角色列表")
    private List<RoleResDTO> roleList;

    @ApiModelProperty(value = "构建令牌：用户权限路径")
    private Set<String> resourceRequestPaths;

    @ApiModelProperty(value = "角色Id【当前】")
    private Long roleId;

    @ApiModelProperty(value = "用户令牌")
    private String userToken;

    private String dataState;

    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//get
    protected LocalDateTime createTime;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")//get
    protected String createDay;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//get
    protected LocalDateTime updateTime;

    @ApiModelProperty(value = "创建者:username")
    private Long createBy;

    @ApiModelProperty(value = "更新者:username")
    private Long updateBy;

    @ApiModelProperty(value = "创建人类型 1 前台 2后台")
    private Integer createType;

    @ApiModelProperty(value = "创建人名称")
    private String creator;

    @ApiModelProperty(value = "后台管理端创建人名称")
    private String adminCreator;

    @ApiModelProperty(value = "更新人名称")
    private String updater;

    @Builder
    public UserResDTO(String username, String password, String nickName, String email, String mobile, String sex, String remark, String[] checkedIds, Set<String> roleVoIds, Set<String> roleLabels, List<RoleResDTO> roleList, Set<String> resourceRequestPaths, Long roleId, String userToken, String dataState, Long id, LocalDateTime createTime, String createDay, LocalDateTime updateTime, Long createBy, Long updateBy, Integer createType, String creator, String adminCreator, String updater) {
        this.username = username;
        this.password = password;
        this.nickName = nickName;
        this.email = email;
        this.mobile = mobile;
        this.sex = sex;
        this.remark = remark;
        this.checkedIds = checkedIds;
        this.roleVoIds = roleVoIds;
        this.roleLabels = roleLabels;
        this.roleList = roleList;
        this.resourceRequestPaths = resourceRequestPaths;
        this.roleId = roleId;
        this.userToken = userToken;
        this.dataState = dataState;
        this.id = id;
        this.createTime = createTime;
        this.createDay = createDay;
        this.updateTime = updateTime;
        this.createBy = createBy;
        this.updateBy = updateBy;
        this.createType = createType;
        this.creator = creator;
        this.adminCreator = adminCreator;
        this.updater = updater;
    }
}
